package com.agree.util.excel.handlers.mapping.params;

import com.agree.util.excel.entity.TableInfo;

import java.io.IOException;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by wangmu on 2017/12/10.
 */
public class KeyGetParamsHandler implements GetParamsHandler {
    @Override
    public List<String> getParams(TableInfo tableInfo, String... params) throws IOException {
        return tableInfo.getTableKey()
                .getKeysField()
                .stream()
                .map(f -> f.getHumpName())
                .collect(Collectors.toList());
    }
}
